import React, { Component } from 'react'
// 受控组件 value、checked / onChange

class App extends Component {
  state = {
    count: 100,
    // 单个复选框
    all: true
  }

  onLogin = () => {}

  render() {
    return (
      <div>
        <div>
          <input
            type="checkbox"
            checked={this.state.all}
            onChange={(e) => this.setState({ all: e.target.checked })}
          />
        </div>
        <div>
          <button onClick={this.onLogin}>进入系统</button>
        </div>
      </div>
    )
  }
}

export default App
